<template>
  <a-card :bordered="false">

    <!-- 查询区域 -->
    <!--<div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">


        </a-row>
      </a-form>
    </div>-->

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus" v-if="dataSource.length == 0">新增</a-button>
    </div>

    <!-- table区域-begin -->
    <div>
      <!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>-->

      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange">

        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>
        </span>

      </a-table>
    </div>
    <!-- table区域-end -->

    <!-- 表单区域 -->
    <gRules-modal ref="modalForm" @ok="modalFormOk"></gRules-modal>
  </a-card>
</template>

<script>
  import '@/assets/less/TableExpand.less'
  import GRulesModal from './modules/GRulesModal'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'

  export default {
    name: "GRulesList",
    mixins:[JeecgListMixin],
    components: {
      GRulesModal
    },
    data () {
      return {
        description: '基础信息管理管理页面',
        // 表头
        columns: [
          /*{
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
           },*/
		   {
            title: '最低提现金额(元)',
            align:"center",
            dataIndex: 'minimumWithdrawal'
           },
		   {
            title: '最高提现金额(元)',
            align:"center",
            dataIndex: 'maximumWithdrawal'
           },
		   {
            title: '提现比例(%)',
            align:"center",
            dataIndex: 'withdrawal'
           },
		   /*{
            title: '用户规则',
            align:"center",
            dataIndex: 'userRules'
           },
		   {
            title: '领取门票有效期限',
            align:"center",
            dataIndex: 'term'
           },
		   {
            title: '推广规则',
            align:"center",
            dataIndex: 'promotionRules'
           },
		   {
            title: '客服名片',
            align:"center",
            dataIndex: 'card'
           },
		   {
            title: '新人有礼海报',
            align:"center",
            dataIndex: 'newPerson'
           },
		   {
            title: '推广图片',
            align:"center",
            dataIndex: 'extensionPic'
           },
		   {
            title: '玩家图片',
            align:"center",
            dataIndex: 'playerPic'
           },*/
		   /*{
            title: '0:正常,1:删除',
            align:"center",
            dataIndex: 'delflag'
           },
		   {
            title: 'remark',
            align:"center",
            dataIndex: 'remark'
           },
		   {
            title: 'remark1',
            align:"center",
            dataIndex: 'remark1'
           },
		   {
            title: 'remark2',
            align:"center",
            dataIndex: 'remark2'
           },
		   {
            title: 'remark3',
            align:"center",
            dataIndex: 'remark3'
           },
		   {
            title: 'remark4',
            align:"center",
            dataIndex: 'remark4'
           },
		   {
            title: 'remark5',
            align:"center",
            dataIndex: 'remark5'
           },
		   {
            title: 'remark6',
            align:"center",
            dataIndex: 'remark6'
           },
		   {
            title: 'remark7',
            align:"center",
            dataIndex: 'remark7'
           },
		   {
            title: 'remark8',
            align:"center",
            dataIndex: 'remark8'
           },
		   {
            title: 'remark9',
            align:"center",
            dataIndex: 'remark9'
           },
		   {
            title: 'remark10',
            align:"center",
            dataIndex: 'remark10'
           },*/
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            scopedSlots: { customRender: 'action' },
          }
        ],
		url: {
          list: "/grules/gRules/list",
          delete: "/grules/gRules/delete",
          deleteBatch: "/grules/gRules/deleteBatch",
          exportXlsUrl: "grules/gRules/exportXls",
          importExcelUrl: "grules/gRules/importExcel",
       },
    }
  },
  computed: {
    importExcelUrl: function(){
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
    methods: {
     
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>